<?php 
include "conectarse.php";
$b = array();
$i = array();
$n = array();
$g = array();
$o = array();

function crearArreglo ($min,$max){
	$arreglo = array();
 $i=0;
while ($i < 5){
	$flag = true;
	$num = mt_rand($min,$max);
foreach ($arreglo as $var){
	if ($var == $num)
		$flag = false;
	}
	if ($flag){
		$arreglo[$i] = $num;
		$i++;
		}
}
return $arreglo;
}
$b = crearArreglo(1,15);
$i = crearArreglo(16,30);
$n = crearArreglo(31,45);
$g = crearArreglo(46,60);
$o = crearArreglo(61,75);
sort($b);sort($i);sort($n);sort($g);sort($o);
$resultado = mysql_query("INSERt INTO carton VALUES (NULL,".$b[0].",".$i[0].",".$n[0].",".$g[0].",".$o[0].",".$b[1].",".$i[1].",".$n[1].",".$g[1].",".$o[1].",".$b[2].",".$i[2].",".$n[2].",".$g[2].",".$o[2].",".$b[3].",".$i[3].",".$n[3].",".$g[3].",".$o[3].",".$b[4].",".$i[4].",".$n[4].",".$g[4].",".$o[4].")", $link);

echo "LISTO".var_dump($resultado);
include "desconectarse.php";
?>